package com.smedi.ismedi.progress.core.application.query;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.core.application.command.ConstructionLogQuery;
import com.smedi.ismedi.progress.core.application.command.ConstructionLogSaveAndDraft;
import com.smedi.ismedi.progress.core.application.command.EngineeringReportDetailQuery;
import com.smedi.ismedi.progress.core.application.command.EngineeringReportQuery;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLogWeather;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.EngineeringReportDetail;
import com.smedi.ismedi.progress.core.application.command.*;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.EngineeringWeekMonthReport;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.EngineeringWeekMonthReportEntity;

import java.time.LocalDate;
import java.util.List;

/**
 * 工程报告服务
 *
 * @author pengyan
 * @date 2021/09/19
 */
public interface EngineeringrReportService {

    /**
     * 工程报告 月报新增
     * @return
     */
    Boolean engineeringMonthReportCreateTask();

    /**
    *  工程报告列表pc 查询
    * @param engineeringReportQuery
    * @return Page<EngineeringWeekMonthReport>
    * @date 2022/11/24 14:03
    */
    Page<EngineeringWeekMonthReport> getEngineeringReportListPC(EngineeringReportQuery engineeringReportQuery,String messageNotifyProjectEpcManagerRole,String messageNotifyProjectManagerRole);

    /**
     *  工程报告列表APP 查询
     * @param engineeringReportQuery
     * @return Page<EngineeringWeekMonthReport>
     * @date 2022/11/24 14:03
     */
    Page<EngineeringWeekMonthReport> getEngineeringReportListAPP(EngineeringReportQuery engineeringReportQuery, String messageNotifyProjectEpcManagerRole);

    /**
    * 工程月报详情
    * @param engineeringReportDetailQuery
    * @return com.smedi.ismedi.progress.core.domain.aggregatemodel.EngineeringReportDetail
    * @date 2022/11/25 14:45
    */
    EngineeringReportDetail getEngineeringReportDetail(EngineeringReportDetailQuery engineeringReportDetailQuery);

    /**
     * 现在周报
     * @return
     */
    Boolean engineeringWeekReportCreateTask();

    /**
     * 主体院审批  获取 工程报告信息
     * @param engineeringReportOneQuery
     * @return
     */
    EngineeringReportOneQuery getEngineeringrReportOne(EngineeringReportOneQuery engineeringReportOneQuery);

    /**
     * 更新主表状态字段
     * @param engineerReport
     */
    void updateEngineeringrReport(EngineeringReportOneQuery engineerReport);

    /**
     * 工程报告 保存草稿与发布
     * @param engineeringSaveAndDraft
     * @return
     */
    EngineeringWeekMonthReportSave engineeringWeekMonthSaveAndDraft(EngineeringWeekMonthReportSave engineeringSaveAndDraft);

    /**
    *  找所有未发布的工程周报
    * @param localDate
    * @param weekType
    * @param projectId
    * @param id
    * @param weekMonthReleaseStatus
    * @return java.lang.Integer
    * @date 2022/12/7 10:08
    */
    Integer findWeekReport(LocalDate localDate, int weekType, Long projectId, Long id, int weekMonthReleaseStatus);

    /**
    * 找所有未发布的工程月报
    * @param localDate
    * @param monthType
    * @param projectId
    * @param weekMonthReleaseStatus
    * @return java.lang.Integer
    * @date 2022/12/7 10:40
    */
    Integer findMonthReport(LocalDate localDate, int monthType, Long projectId, int weekMonthReleaseStatus);

    List<EngineeringWeekMonthReportEntity> selectAllNoty(LocalDate localDate, int weekType, int weekMonthReleaseStatus);
}
